//
//  HSYCustomMessageView.h
//  CustomNavigationController
//
//  Created by key on 2017/2/13.
//  Copyright © 2017年 huangsongyao. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, kHSYCustomMessageAnimationDirectionType) {
    
    kHSYCustomMessageAnimationDirectionTypeTopLeft              = 0,    //动画方向左上角
    kHSYCustomMessageAnimationDirectionTypeTopRight             = 1,    //动画方向右上角
    kHSYCustomMessageAnimationDirectionTypeBottomLeft           = 2,    //动画方向左下角
    kHSYCustomMessageAnimationDirectionTypeBottomRight          = 3,    //动画方向右下角
};

typedef NS_ENUM(NSUInteger, kHSYCustomMessagePropertyType) {
    
    kHSYCustomMessagePropertyTypeDataSource                     = 0,    //用于显示的数据源
    kHSYCustomMessagePropertyTypeAnimationDirection             = 1,    //动画方向
    kHSYCustomMessagePropertyTypeRaduis                         = 2,    //圆角度数
    kHSYCustomMessagePropertyTypeBgColor                        = 3,    //背景色
    kHSYCustomMessagePropertyTypePointX                         = 4,    //坐标X点
    kHSYCustomMessagePropertyTypePointY                         = 5,    //坐标Y点
    kHSYCustomMessagePropertyTypeSizeW                          = 6,    //视图宽度
    kHSYCustomMessagePropertyTypeSizeH                          = 7,    //视图高度
};

@interface HSYCustomMessageView : UIView

@property (nonatomic, assign) CGFloat raduis;
@property (nonatomic, strong, setter=backgroundColor:) UIColor *bgColor;

@end

@interface HSYCustomMessageView (Animation)

/**
 展示动画
 */
- (void)showMessageView;

/**
 移除动画
 */
- (void)removeMessageView;

@end

@interface HSYCustomMessageView (Show)

/**
 快捷方式

 @param view      添加到的父视图
 @param params    属性部署，key请用kHSYCustomMessagePropertyType枚举
 @param row       点击到row后的回调
 @param remove    移除视图后的回调
 @param completed 视图展示完毕的回调

 @return HSYCustomMessageView
 */
+ (HSYCustomMessageView *)showMessageViewInView:(UIView *)view byPropertyParams:(NSDictionary <NSNumber *, id>*)params didSelectRowAtIndexPath:(void(^)(id x, NSIndexPath *indexPath))row removeDidMessage:(void(^)())remove completed:(void(^)(BOOL finished))completed;

@end
